package com.zhuozhou.jdyc.main.user.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.zhuozhou.jdyc.R;
import com.zhuozhou.jdyc.base.BaseActivity;
import com.zhuozhou.jdyc.databinding.BaseFragmentContainerBinding;
import com.zhuozhou.jdyc.main.main.viewmodel.MainViewModel;
import com.zhuozhou.jdyc.main.user.fragment.SettingFragment;


/**
 * Create by CherishTang on 2019/10/11
 * describe:设置
 */
public class SettingActivity extends BaseActivity<MainViewModel, BaseFragmentContainerBinding> {
    private Bundle bundle;

    @Override
    protected int getLayoutId() {
        return R.layout.base_fragment_container;
    }

    @Override
    public String setTitleBar() {
        return "设置";
    }

    @Override
    public void initView() {
        setThemeBarAndToolBarColor(R.color.default_background);
    }

    @Override
    public void initData(Bundle bundle) {
        bundle = getIntent().getExtras() == null ? new Bundle() : getIntent().getExtras();
        mViewModel.setFragment(getSupportFragmentManager(),SettingFragment.instantiate(bundle),R.id.fragment_container);
    }

    public static void show(Context context, Bundle bundle) {
        Intent intent = new Intent(context, SettingActivity.class);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }

}
